﻿Option Explicit On
Option Strict On

''' <summary>
''' Clase para gestionar el cliente
''' </summary>
''' <autor_modificacion>AitorSalgado</autor_modificacion>
''' <fecha_Modificado>24/01/2012</fecha_Modificado>
''' <modificaciones>
''' 1.0 - Creada la clase
''' 
''' 
''' </modificaciones>
''' <fecha_creación>24/01/2012</fecha_creación>
''' <author>Aitor Salgado Molina</author>
''' 
Public Class Cliente

#Region "Atributos"

    Private _CodCliente As Integer
    Private _Nombre As String
    Private _Apellido As String
    Private _Telefono As Integer
    Private _CP As Integer
    Private _FechaNac As Date
    Private _email As String

#End Region

#Region "constructor y destructor"

    Public Sub New()
        _CodCliente = 0
        _Nombre = ""
        _Apellido = ""
        _Telefono = 0
        _CP = 0
        _FechaNac = New Date
        _email = ""
    End Sub

    Public Sub New(ByVal _NuevoCod As Integer, ByVal _NuevoNombre As String, ByVal _NuevoApellido As String, ByVal _NuevoTelefono As Integer,
                   ByVal _NuevoCP As Integer, ByVal _NuevaFecha As Date, ByVal _NuevoEmail As String)
        _CodCliente = _NuevoCod
        _Nombre = _NuevoNombre
        _Apellido = _NuevoApellido
        _Telefono = _NuevoTelefono
        _CP = _NuevoCP
        _FechaNac = _NuevaFecha
        _email = _NuevoEmail
    End Sub


    Public Sub New(ByVal copyEmpleado As Cliente)
        With copyEmpleado
            _CodCliente = .CodCliente
            _Nombre = .Nombre
            _Apellido = .Apellido
            _Telefono = .Telefono
            _CP = .CP
            _FechaNac = .FechaNac
            _email = .email
        End With
    End Sub

    Public Sub Dispose()
        _CodCliente = 0
        _Nombre = ""
        _Apellido = ""
        _Telefono = 0
        _CP = 0
        _FechaNac = New Date
        _email = ""
    End Sub

    Protected Overrides Sub Finalize()
        _CodCliente = 0
        _Nombre = ""
        _Apellido = ""
        _Telefono = 0
        _CP = 0
        _FechaNac = New Date
        _email = ""
    End Sub

#End Region

#Region "Propiedades"

    Public Property CodCliente() As Integer
        Get
            Return _CodCliente
        End Get
        Set(ByVal value As Integer)
            _CodCliente = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Apellido() As String
        Get
            Return _Apellido
        End Get
        Set(ByVal value As String)
            _Apellido = value
        End Set
    End Property

    Public Property Telefono() As Integer
        Get
            Return _Telefono
        End Get
        Set(ByVal value As Integer)
            _Telefono = value
        End Set
    End Property

    Public Property CP() As Integer
        Get
            Return _CP
        End Get
        Set(ByVal value As Integer)
            _CP = value
        End Set
    End Property

    Public Property FechaNac() As Date
        Get
            Return _FechaNac
        End Get
        Set(ByVal value As Date)
            _FechaNac = value
        End Set
    End Property

    Public Property email() As String
        Get
            Return _email
        End Get
        Set(ByVal value As String)
            _email = value
        End Set
    End Property

#End Region

#Region "Metodos publicos"

#End Region

#Region "Metodos privados"

#End Region
End Class
